Mule : Oracle AQ Integration
This page last changed on May 31, 2006 by tcarlson.
There are some tricks to getting Oracle AQ working with Mule because the AQ implementation veers from the Jms specification when creating Connection Factories. The big difference is that Oracle uses a db-centric queue model meaning that really when you create a Connection you are creating a Oracle Jdbc connection. This connector will let Mule talk via the Jms API to a queue in an oracle database without using Jndi. (oracle standard edition disables exporting a queue to a repository). The Oracle JMS Provider extends the standard Mule Jms Provider with functionality specific to Oracle's JMS implementation based on Advanced Queueing (Oracle AQ). The javadoc for this transport provider can be found here. And the Source Xref can be found here. The Oracle JMS Provider adds support for queues with ADT (Advanced Data Type) payloads, including Oracle's native XML data type Unlike the standard JMS Provider, the Oracle JMS Provider does not require a JNDI provider to use.
PropertiesIn addition to the properties available for the standard Jms Provider, the Oracle JMS Provider adds the following properties:
TransformersIn addition to the transformers available for the standard Jms Provider, the Oracle JMS Provider adds the following transformers, found in org.mule.vendor.oracle.jms.transformers.
The default transformers are the same as the standard JMS Provider (JMSMessageToObject and ObjectToJMSMessage). Example ConfigurationThe following is an example configuration using the Oracle JMS Provider: <mule-configuration id="TestConfiguration" version="1.0"> <connector name="oracleJmsConnector" className="org.mule.providers.oracle.jms.OracleJmsConnector"> <properties> <property name="url" value="jdbc:oracle:oci:@myhost" /> <property name="username" value="scott" /> <property name="password" value="tiger" /> </properties> </connector> <transformers> <transformer name="StringToXMLMessage" className="org.mule.providers.oracle.jms.transformers.StringToXMLMessage" returnClass="oracle.jms.AdtMessage" /> <transformer name="XMLMessageToString" className="org.mule.providers.oracle.jms.transformers.XMLMessageToString" returnClass="java.lang.String" /> </transformers> <global-endpoints> <endpoint name="XmlQueue" address="oaq://XML_QUEUE" transformers="StringToXMLMessage" /> </global-endpoints> <model name="Test Model"> <mule-descriptor name="XML-Driven UMO" implementation="com.foo.MyUMO"> <inbound-router> <endpoint address="oaq://XML_QUEUE" transformers="XMLMessageToString"> <properties> <property name="payloadFactory" value="oracle.xdb.XMLTypeFactory" /> </properties> </endpoint> </inbound-router> </mule-descriptor> </model> </mule-configuration>
EndpointsOracle AQ endpoints are expressed in the same way as Jms endpoints except the protocol is different. oaq://my.queue or oaq://topic:my.topic
You can define an Oracle AQ endpoint without declaring the connector (as shown above), by including all necessary information on the endpoint uri i.e. oaq://XML_QUEUE?url=jdbc:oracle:oci:scott/tiger@myhost
Refer to the unit tests for more examples on how to use the provider. DependenciesThe Oracle JMS Provider requires the following Oracle libraries, which should be included in your Oracle installation:
These jars are included in the distribution. Unit TestsThe unit tests consist of two test suites: UnitTestSuite.java and IntegrationTestSuite.java. Only the integration test suite requires a live Oracle database.
Roadmap (TO DO)
|
Document generated by Confluence on Nov 27, 2006 10:27 |